import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useStore = defineStore('storeId', {
  persist:true,
  state:()=>{
    return {
       // 所有这些属性都将自动推断其类型
        counter: 2,
        name: 'Eduardo',
        isAdmin: true,
    }
  },
  getters:{
    getterName(state){
       return state.counter*3
    }
  }
})
